package com.yuedou.api.entity.platform;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * 素材库对象 material
 *
 * @author ruoyi
 * @date 2021-08-13
 */
@Data
@NoArgsConstructor
@Accessors(chain = true)
@TableName("material")
public class Material implements Serializable {

    private static final long serialVersionUID=1L;

    /**
     * PK
     */
    @TableId(type = IdType.ASSIGN_UUID)
    private String id;

    /**
     * 创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;

    /**
     * 创建者ID
     */
    private String createId;

    /**
     * 类型1、图片；2、视频
     */
    private String type;

    /**
     * 分组ID
     */
    private Integer groupId;

    /**
     * 素材名
     */
    private String name;

    /**
     * 素材链接
     */
    private String url;

    /**
     * $column.columnComment
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date updateTime;

    /**
     * $column.columnComment
     */
    private Integer isDel;

    @TableField(exist = false)
    private String imgUrl;

}
